<?php

namespace app\common\service\traits;

trait InstanceTrait
{

    protected static ?self $_instance = null;

    public static function instance():static
    {
        if (!self::$_instance){
            self::$_instance = new self();
        }
        return self::$_instance;
    }
}
